package edu.xidian.onlinedocument.utils.ot.internal.operations;

import edu.xidian.onlinedocument.utils.ot.internal.Text;

public class Retain extends Change {
    /**
     * 从当前位置开始向后移动length个字符的长度
     */
    private int length;

    public Retain(int length) {
        this.length = length;
    }

    /*
    @Override
    public Text apply(int position, Text text) {
        return text;
    }
     */

    @Override
    public Integer offset() {
        return length;
    }

    @Override
    public String value() {
        return null;
    }

    @Override
    public String toString() {
        return "{ retain:" + length + " }";
    }
}
